//
//  ViewControllerB.m
//  模态视图
//
//  Created by student on 16/2/25.
//  Copyright © 2016年 niit. All rights reserved.
//

#import "ViewControllerB.h"

@interface ViewControllerB ()
@property (weak, nonatomic) IBOutlet UILabel *resultLabel;

@end

@implementation ViewControllerB

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.resultLabel.text = [NSString stringWithFormat:@"用户名：%@ 密码：%@ \n%@",self.userName,self.passWord,[self.userName isEqualToString:@"admin"]&&[self.passWord isEqualToString:@"123"]?@"登陆成功":@"登录失败"];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)cancelBtn:(id)sender
{
    [self dismissViewControllerAnimated:YES completion:nil];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
